***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
*** This Program already converted to Y2K                                                                                                                                                                                                                 
*** S&T Departement     on 29 April 1999 by Ben.Rahman                                                                                                                                                                                                    
***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
set cent on                                                                                                                                                                                                                                               
SET PROC TO RPROCSUM                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
@08,03 CLEA TO 22,78                                                                                                                                                                                                                                      
@10,25 SAY 'SUMMARY REPORT OF PROCEDURES PERFORMED'                                                                                                                                                                                                       
@12,25 SAY 'PROCEDURE CODE :      TO     '                                                                                                                                                                                                                
                                                                                                                                                                                                                                                          
STOR SPAC(4) TO cCode1, cCode2                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                          
DO WHIL .T.                                                                                                                                                                                                                                               
   @12,42 GET cCode1                                                                                                                                                                                                                                      
   READ                                                                                                                                                                                                                                                   
   IF cCode1 = SPAC(4)                                                                                                                                                                                                                                    
      EXIT                                                                                                                                                                                                                                                
   ENDI                                                                                                                                                                                                                                                   
   @12,50 GET cCode2                                                                                                                                                                                                                                      
   READ                                                                                                                                                                                                                                                   
   IF cCode2 = SPAC(4)                                                                                                                                                                                                                                    
      EXIT                                                                                                                                                                                                                                                
   ENDI                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                          
   svconf = SAVESCREEN(00,00,24,79)                                                                                                                                                                                                                       
   SET COLO TO W+/N,W+/R                                                                                                                                                                                                                                  
   @14,24 CLEA TO 16,45                                                                                                                                                                                                                                   
   @14,24 TO 16,45 DOUBLE                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                          
   @15,25 PROMPT 'PRINT'                                                                                                                                                                                                                                  
   @15,30 SAY '/'                                                                                                                                                                                                                                         
   @15,31 PROMPT 'CANCELL'                                                                                                                                                                                                                                
   @15,38 SAY '/'                                                                                                                                                                                                                                         
   @15,39 PROMPT 'ESCAPE'                                                                                                                                                                                                                                 
   MENU TO nJw                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                          
   SET COLO TO W/B,W+/BG                                                                                                                                                                                                                                  
   RESTSCREEN(00,00,24,79,svconf)                                                                                                                                                                                                                         
   DO CASE                                                                                                                                                                                                                                                
      CASE nJw = 1                                                                                                                                                                                                                                        
         DO PPROCSUM                                                                                                                                                                                                                                      
         EXIT                                                                                                                                                                                                                                             
      CASE nJw = 2                                                                                                                                                                                                                                        
         LOOP                                                                                                                                                                                                                                             
      CASE nJw = 3                                                                                                                                                                                                                                        
         EXIT                                                                                                                                                                                                                                             
   ENDC                                                                                                                                                                                                                                                   
ENDD                                                                                                                                                                                                                                                      
SET COLO TO W/N,W/N                                                                                                                                                                                                                                       
CLEA                                                                                                                                                                                                                                                      
CLOS ALL                                                                                                                                                                                                                                                  
RETU                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
PROC PPROCSUM                                                                                                                                                                                                                                             
*------------                                                                                                                                                                                                                                             
*         1         2         3         4         5         6         7         8         9         0         1         2         3         4         5         6                                                                                         
*12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901                                                                                                                      
*                                          SUMMARY OF PROCEDURES PERFORMED                                           DATE : 99/99/9999                                                                                                                    
*                                                                                                                    PAGE : 9,999                                                                                                                         
*===================================================================================================================================                                                                                                                      
*CODE  NAME                           1      2      3      4      5      6      7      8      9     10     11     12    YTD      AVG                                                                                                                      
*===================================================================================================================================                                                                                                                      
*XXXX-X----------------------X X 99,999 99,999 99,999 99,999 99,999 99,999 99,999 99,999 99,999 99,999 99,999 99,999 99,999 99,999.9                                                                                                                      
                                                                                                                                                                                                                                                          
@13,25 SAY 'Processing...'                                                                                                                                                                                                                                
DR1 = 'N:'                                                                                                                                                                                                                                                
DR2 = 'N:'                                                                                                                                                                                                                                                
F1  = 'ACT_PROY'                                                                                                                                                                                                                                          
F2  = 'TEMP_PRO'                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
SET EXCLU OFF                                                                                                                                                                                                                                             
USE &DR1&F1                                                                                                                                                                                                                                               
COPY STRU TO &DR1&F2                                                                                                                                                                                                                                      
USE                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                          
cDate1 = '01/01/'+SUBS(STR(YEAR(DATE()),4),3,2)                                                                                                                                                                                                           
cDate2 = '31/12/'+SUBS(STR(YEAR(DATE()),4),3,2)                                                                                                                                                                                                           
dDate1 = CTOD(cDate1)                                                                                                                                                                                                                                     
dDate2 = CTOD(cDate2)                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                          
cCode11 = SUBS(cCode1,1,1)                                                                                                                                                                                                                                
cCode12 = SUBS(cCode1,2,1)                                                                                                                                                                                                                                
cCode13 = SUBS(cCode1,3,2)                                                                                                                                                                                                                                
cCode21 = SUBS(cCode2,1,1)                                                                                                                                                                                                                                
cCode22 = SUBS(cCode2,2,1)                                                                                                                                                                                                                                
cCode23 = SUBS(cCode2,3,2)                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                          
SET EXCLU OFF                                                                                                                                                                                                                                             
USE &DR1&F2                                                                                                                                                                                                                                               
APPE FROM &DR1&F1 FOR (DATE_VISIT >= dDate1) .AND. (DATE_VISIT <= dDate2);                                                                                                                                                                                
     .AND. (AREA_CODE >= cCode11) .AND. (SUB_AREACO >= cCode12) .AND.;                                                                                                                                                                                    
     (PRO_CODE >= cCode13) .AND. (AREA_CODE <= cCode21) .AND. (SUB_AREACO <= cCode22);                                                                                                                                                                    
     .AND. (PRO_CODE <= cCode23)                                                                                                                                                                                                                          
INDE ON AREA_CODE+SUB_AREACO+PRO_CODE+DTOS(DATE_VISIT) TO &DR1&F2                                                                                                                                                                                         
USE                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                          
@13,25 SAY 'Printing...  '                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                          
SET EXCLU OFF                                                                                                                                                                                                                                             
USE &DR1&F2 INDE &DR1&F2                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                          
SET PRIN ON                                                                                                                                                                                                                                               
SET DEVI TO PRIN                                                                                                                                                                                                                                          
?CHR(15)                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                          
SELE 1                                                                                                                                                                                                                                                    
GO BOTT                                                                                                                                                                                                                                                   
nMonav = MONTH(DATE_VISIT)                                                                                                                                                                                                                                
GO TOP                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                          
SELE 1                                                                                                                                                                                                                                                    
STOR 0 TO nHal, nBrs, nQty1, nQty2, nQty3, nBl11, nBl12, nBl13, nBl21, nBl22,;                                                                                                                                                                            
     nBl23, nBl31, nBl32, nBl33, nBl41, nBl42, nBl43, nBl51, nBl52, nBl53,;                                                                                                                                                                               
     nBl61, nBl62, nBl63, nBl71, nBl72, nBl73, nBl81, nBl82, nBl83, nBl91,;                                                                                                                                                                               
     nBl92, nBl93, nBl101, nBl102, nBl103, nBl111, nBl112, nBl113, nBl121,;                                                                                                                                                                               
     nBl122, nBl123, nYtd1, nYtd2, nYtd3, nAvg1, nAvg2, nAvg3                                                                                                                                                                                             
                                                                                                                                                                                                                                                          
DO HDRPRSUM                                                                                                                                                                                                                                               
DO WHIL .NOT. EOF()                                                                                                                                                                                                                                       
   cArea = AREA_CODE                                                                                                                                                                                                                                      
   cSub  = SUB_AREACO                                                                                                                                                                                                                                     
   cPro  = PRO_CODE                                                                                                                                                                                                                                       
   cName = SHRT_DESCR                                                                                                                                                                                                                                     
   STOR 0 TO nBl11, nBl12, nBl13, nBl21, nBl22, nBl23, nBl31,nBl32, nBl33,;                                                                                                                                                                               
        nBl41, nBl42, nBl43, nBl51, nBl52, nBl53, nBl61, nBl62, nBl63, nBl71,;                                                                                                                                                                            
        nBl72, nBl73, nBl81, nBl82, nBl83, nBl91, nBl92, nBl93, nBl101, nBl102,;                                                                                                                                                                          
        nBl103, nBl111, nBl112, nBl113, nBl121, nBl122, nBl123, nYtd1, nYtd2,;                                                                                                                                                                            
        nYtd3, nAvg1, nAvg2, nAvg3                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                          
   DO WHIL (AREA_CODE = cArea) .AND. (SUB_AREACO = cSub) .AND.;                                                                                                                                                                                           
   (PRO_CODE = cPro) .AND. .NOT. EOF()                                                                                                                                                                                                                    
      nMon  = MONTH(DATE_VISIT)                                                                                                                                                                                                                           
      STOR 0 TO nQty1, nQty2, nQty3                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                          
      DO WHIL (AREA_CODE = cArea) .AND. (SUB_AREACO = cSub) .AND.;                                                                                                                                                                                        
      (PRO_CODE = cPro)  .AND. (nMon = MONTH(DATE_VISIT)) .AND. .NOT. EOF()                                                                                                                                                                               
         IF PAT_CODTYP = '0' .OR. PAT_CODTYP = '9'                                                                                                                                                                                                        
            nQty1 = nQty1 + PROC_X                                                                                                                                                                                                                        
         ELSE                                                                                                                                                                                                                                             
            IF PAT_CODTYP = '6'                                                                                                                                                                                                                           
               nQty2 = nQty2 + PROC_X                                                                                                                                                                                                                     
            ELSE                                                                                                                                                                                                                                          
               nQty3 = nQty3 + PROC_X                                                                                                                                                                                                                     
            ENDI                                                                                                                                                                                                                                          
         ENDI                                                                                                                                                                                                                                             
         SKIP                                                                                                                                                                                                                                             
      ENDD                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                          
      nYtd1 = nYtd1 + nQty1                                                                                                                                                                                                                               
      nYtd2 = nYtd2 + nQty3                                                                                                                                                                                                                               
      nYtd3 = nYtd3 + nQty2                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                          
      DO CASE                                                                                                                                                                                                                                             
         CASE nMon = 1                                                                                                                                                                                                                                    
            nBl11  = nQty1                                                                                                                                                                                                                                
            nBl12  = nQty3                                                                                                                                                                                                                                
            nBl13  = nQty2                                                                                                                                                                                                                                
         CASE nMon = 2                                                                                                                                                                                                                                    
            nBl21  = nQty1                                                                                                                                                                                                                                
            nBl22  = nQty3                                                                                                                                                                                                                                
            nBl23  = nQty2                                                                                                                                                                                                                                
         CASE nMon = 3                                                                                                                                                                                                                                    
            nBl31  = nQty1                                                                                                                                                                                                                                
            nBl32  = nQty3                                                                                                                                                                                                                                
            nBl33  = nQty2                                                                                                                                                                                                                                
         CASE nMon = 4                                                                                                                                                                                                                                    
            nBl41  = nQty1                                                                                                                                                                                                                                
            nBl42  = nQty3                                                                                                                                                                                                                                
            nBl43  = nQty2                                                                                                                                                                                                                                
         CASE nMon = 5                                                                                                                                                                                                                                    
            nBl51  = nQty1                                                                                                                                                                                                                                
            nBl52  = nQty3                                                                                                                                                                                                                                
            nBl53  = nQty2                                                                                                                                                                                                                                
         CASE nMon = 6                                                                                                                                                                                                                                    
            nBl61  = nQty1                                                                                                                                                                                                                                
            nBl62  = nQty3                                                                                                                                                                                                                                
            nBl63  = nQty2                                                                                                                                                                                                                                
         CASE nMon = 7                                                                                                                                                                                                                                    
            nBl71  = nQty1                                                                                                                                                                                                                                
            nBl72  = nQty3                                                                                                                                                                                                                                
            nBl73  = nQty2                                                                                                                                                                                                                                
         CASE nMon = 8                                                                                                                                                                                                                                    
            nBl81  = nQty1                                                                                                                                                                                                                                
            nBl82  = nQty3                                                                                                                                                                                                                                
            nBl83  = nQty2                                                                                                                                                                                                                                
         CASE nMon = 9                                                                                                                                                                                                                                    
            nBl91  = nQty1                                                                                                                                                                                                                                
            nBl92  = nQty3                                                                                                                                                                                                                                
            nBl93  = nQty2                                                                                                                                                                                                                                
         CASE nMon = 10                                                                                                                                                                                                                                   
            nBl101 = nQty1                                                                                                                                                                                                                                
            nBl102 = nQty3                                                                                                                                                                                                                                
            nBl103 = nQty2                                                                                                                                                                                                                                
         CASE nMon = 11                                                                                                                                                                                                                                   
            nBl111 = nQty1                                                                                                                                                                                                                                
            nBl112 = nQty3                                                                                                                                                                                                                                
            nBl113 = nQty2                                                                                                                                                                                                                                
         CASE nMon = 12                                                                                                                                                                                                                                   
            nBl121 = nQty1                                                                                                                                                                                                                                
            nBl122 = nQty3                                                                                                                                                                                                                                
            nBl123 = nQty2                                                                                                                                                                                                                                
      ENDC                                                                                                                                                                                                                                                
   ENDD                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                          
   nAvg1 = nYtd1 / nMonav                                                                                                                                                                                                                                 
   nAvg2 = nYtd2 / nMonav                                                                                                                                                                                                                                 
   nAvg3 = nYtd3 / nMonav                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                          
   IF nBrs > 56                                                                                                                                                                                                                                           
      nBrs = nBrs + 2                                                                                                                                                                                                                                     
      @nBrs,01 SAY 'A = AEA Employee, B = Clients, C = Outsider'                                                                                                                                                                                          
      DO HDRPRSUM                                                                                                                                                                                                                                         
   ENDI                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                          
   @nBrs,01  SAY cArea+cSub+cPro+'-'+cName                                                                                                                                                                                                                
   @nBrs,31  SAY 'A'                                                                                                                                                                                                                                      
   @nBrs,33  SAY nBl11  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,40  SAY nBl21  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,47  SAY nBl31  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,54  SAY nBl41  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,61  SAY nBl51  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,68  SAY nBl61  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,75  SAY nBl71  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,82  SAY nBl81  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,89  SAY nBl91  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,96  SAY nBl101 PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,103 SAY nBl111 PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,110 SAY nBl121 PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,117 SAY nYtd1  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,124 SAY nAvg1  PICT '99,999.9'                                                                                                                                                                                                                   
   nBrs = nBrs + 1                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                          
   @nBrs,31  SAY 'B'                                                                                                                                                                                                                                      
   @nBrs,33  SAY nBl12  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,40  SAY nBl22  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,47  SAY nBl32  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,54  SAY nBl42  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,61  SAY nBl52  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,68  SAY nBl62  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,75  SAY nBl72  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,82  SAY nBl82  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,89  SAY nBl92  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,96  SAY nBl102 PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,103 SAY nBl112 PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,110 SAY nBl122 PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,117 SAY nYtd2  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,124 SAY nAvg2  PICT '99,999.9'                                                                                                                                                                                                                   
   nBrs = nBrs + 1                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                          
   @nBrs,31  SAY 'C'                                                                                                                                                                                                                                      
   @nBrs,33  SAY nBl13  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,40  SAY nBl23  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,47  SAY nBl33  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,54  SAY nBl43  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,61  SAY nBl53  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,68  SAY nBl63  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,75  SAY nBl73  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,82  SAY nBl83  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,89  SAY nBl93  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,96  SAY nBl103 PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,103 SAY nBl113 PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,110 SAY nBl123 PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,117 SAY nYtd3  PICT '99,999'                                                                                                                                                                                                                     
   @nBrs,124 SAY nAvg3  PICT '99,999.9'                                                                                                                                                                                                                   
   nBrs = nBrs + 1                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                          
ENDD                                                                                                                                                                                                                                                      
@nBrs,01  SAY '==================================================================================================================================='                                                                                                       
nBrs = nBrs + 2                                                                                                                                                                                                                                           
@nBrs,01 SAY 'A = AEA Employee, B = Clients, C = Outsider'                                                                                                                                                                                                
?CHR(18)                                                                                                                                                                                                                                                  
SET PRIN OFF                                                                                                                                                                                                                                              
SET DEVI TO SCREE                                                                                                                                                                                                                                         
RETU                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
PROC HDRPRSUM                                                                                                                                                                                                                                             
*------------                                                                                                                                                                                                                                             
nHal = nHal + 1                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                          
@01,43  SAY 'SUMMARY OF PROCEDURES PERFORMED'                                                                                                                                                                                                             
@01,117 SAY 'DATE :'                                                                                                                                                                                                                                      
@01,124 SAY DATE()                                                                                                                                                                                                                                        
@02,117 SAY 'PAGE :'                                                                                                                                                                                                                                      
@02,124 SAY nHal PICT '9,999'                                                                                                                                                                                                                             
@03,01  SAY '==================================================================================================================================='                                                                                                         
@04,01  SAY 'CODE  NAME                           1      2      3      4      5      6      7      8      9     10     11     12    YTD      AVG'                                                                                                         
@05,01  SAY '==================================================================================================================================='                                                                                                         
nBrs = 7                                                                                                                                                                                                                                                  
RETU                                                                                                                                                                                                                                                      
